//package com
//
//import android.app.Application
//import android.content.Intent
//import android.util.Log
//import xcrash.ICrashCallback
//import xcrash.XCrash
//
//class CrashHandler(private val aContext: Application) : XCrash.InitParameters(), ICrashCallback {
//    init {
//        setAnrCallback(this)
//        setJavaCallback(this)
//        setNativeCallback(this)
//        setAnrLogCountMax(3)
//        setJavaLogCountMax(3)
//        setNativeLogCountMax(3)
//        setAnrRethrow(false)
//        setJavaRethrow(false)
//        setNativeRethrow(false)
////        setLogDir(File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS), "xcrash").path)
//    }
//
//    override fun onCrash(logPath: String?, emergency: String?) {
//        Log.e("Crash", "path:$logPath, emergency:$emergency")
//        aContext.startActivity(aContext.packageManager.getLaunchIntentForPackage(aContext.packageName)?.apply {
//            addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
//            addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
//        })
//    }
//}